import { getDvaApp } from 'umi';
import storejs from 'storejs';
import dark from './dark';
import white from './white';

let allTheme = { dark, white };
class Theme {
  current;
  getAllThemeName() {
    return Object.keys(allTheme);
  }
  getAllTheme() {
    return allTheme;
  }
  getTheme() {
    return this.current;
  }
  setTheme(str) {
    this.current = allTheme[str];
    storejs('theme', str);
  }
}
let theme = new Theme();
export default theme;
